package com.dg.river.core.util;

import android.util.Base64;

/**
 * Created by hy on 2018/12/7
 * Description : base64 编码加密解密
 */
public class Base64Utils {

    /**
     * 加密
     *
     * @param string
     */
    public static String enCode(String string) {
        return Base64.encodeToString(string.getBytes(), Base64.DEFAULT);
    }

    /**
     * 解密
     *
     * @param string
     */
    public static String deCode(String string) {
        return new String(Base64.decode(string.getBytes(), Base64.DEFAULT));
    }
}
